package com.joint.base.dao.impl;


import com.joint.base.dao.ExportDao;
import com.joint.base.entity.Company;
import com.joint.base.parent.BaseEntity;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * Created by IntelliJ IDEA.
 * User: xuzhou
 * Date: 2015/4/1
 * Time: 10:28
 */
@Repository
public class ExportDaoImpl extends BaseEntityDaoImpl<BaseEntity, String> implements ExportDao {
    @Override
    public List<BaseEntity> getAll(Company company, String  entityName) {
        String hql = "from " + entityName+" where company=?";
        return getSession().createQuery(hql).setParameter(0,company).list();
    }
}
